package com.core.role.dao;

import java.util.List;

import com.core.role.dto.RoleDto;
import com.core.role.dto.RoleSearchCondition;
import com.core.role.pojo.Role;
import com.core.user.dto.UserSearchCondition;
import com.core.user.pojo.SysUserRole;
import com.core.user.pojo.User;

public interface RoleDao {
    Role getById(Role role);
    
    void add(Role role);

    void batAdd(SysUserRole sysUserRole);
    
    void batDelete(SysUserRole sysUserRole);

    void update(Role role);

    void delete(Role role);

    List<Role> searchPojo(RoleSearchCondition sc);

    List<RoleDto> searchDto(RoleSearchCondition sc);

    Integer searchCnt(RoleSearchCondition sc);

//======================================= new method create here ====================================/
    List<Role> searchPojoByUserId(User user);
    List<Role> searchPojoByUserId1(UserSearchCondition usc);
    Integer searchPojoByUserIdCnt(UserSearchCondition usc);
    List<Role> searchPojoByUserIdNot(UserSearchCondition usc);
    Integer searchPojoByUserIdNotCnt(UserSearchCondition usc);
    Role getByCode(String code);
}
